<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<head>
	 <jsp:include page="head.jsp"></jsp:include>
</head>
	<body style="margin:0;padding:0;height:100%;overflow:hidden;background:#F2FBFF">
	<form id="roleForm" >
		<input type="hidden" id="roleid" name="id" value=""/>
	</form>	
  			<div id="mainlayout" class="easyui-layout" fit="true">
			<div region="north" border="false">
				<div class="toolbar">
					<table cellpadding="0" cellspacing="0" style="width:95%;height=30px;">
						<tr>
							<td>
								<a href="javascript:newItem()" class="easyui-linkbutton" iconCls="icon-add" plain="true">新增</a>
								<a href="javascript:editItem()" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
								<a href="javascript:removeItem()" class="easyui-linkbutton" iconCls="icon-cancel" plain="true">删除</a>
								<a href="javascript:back()" class="easyui-linkbutton" iconCls="icon-reload" plain="true">刷新</a>
								<a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="lookGroupHaveRole()">查看拥有该角色的组</a>
								<a href="javascript:authorizate()" class="easyui-linkbutton" iconCls="icon-search" plain="true">分配资源</a>
								
								<a href="javascript:resActions()" class="easyui-linkbutton" iconCls="icon-search" plain="true">分配操作</a>
								
							</td>
							<!-- 
							<td style="text-align:right">
								<a href="javascript:advanceQuery()" class="easyui-linkbutton" plain="true">高级查询</a>
							</td>
							 -->
						</tr>
					</table>
				</div>
			</div>
			<div region="center" border="false">
				<table id="dt-role" class="easyui-datagrid"
						url="<c:url value='/permissions/getItemsRole.tg'/>"
						fit="true" border="false" 
						pagination="true" striped="true"						
						singleSelect="true" rownumbers="true">
					<thead>
						<tr>
							<th field="name" width="100" sortable="true">角色名称</th>
							<!-- <th field="enname" width="100" sortable="true">英文名称</th> 
							<th field="orderid" width="100" sortable="true">排序</th>-->
							<th field="status" width="100" sortable="true" formatter="statusFormatter">状态</th>
							<th field="memo" width="250">备注</th>
						</tr>
					</thead>
				</table>
			</div>
		<div id="dlg" class="easyui-dialog" style="width:350px;height:430px;"
				closed="true" modal="true" buttons="#dlg-buttons">
			<form id="myform" method="post">
				<jsp:include page="_form.jsp"></jsp:include>
			</form>
			<div id="dlg-buttons" style="text-align:center">
				<a  href="#" class="easyui-linkbutton"  iconCls="icon-save" onclick="saveItem()">保存</a>
				<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">关闭</a>
			</div>
		</div>
		<div id="auth" class="easyui-dialog" style="width:350px;height:400px;"
				closed="true" modal="true" buttons="#auth-buttons">
			<form id="authorization" method="post">
				<ul id="tt"></ul>
			</form>
			<div id="auth-buttons" style="text-align:center">
				<a href="#" class="easyui-linkbutton" iconCls="icon-save" onclick="saveAuthorizate()">保存</a>
				<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#auth').dialog('close')">关闭</a>
			</div>
		</div>
		<div id="ac" class="easyui-dialog" style="width:900px;height:400px;"
				closed="true" modal="true" buttons="#actions-buttons">
			<form id="actions" method="post">
				<div id="resActions"></div>
			</form>
			<div id="actions-buttons" style="text-align:center">
				<a href="#" class="easyui-linkbutton" iconCls="icon-save" onclick="saveResActions()">保存</a>
				<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#ac').dialog('close')">关闭</a>
			</div>
		</div>
		<div id="detail" class="easyui-dialog" style="width:350px;height:430px;"
				closed="true" modal="true" buttons="#detail-buttons">
			<form id="groups">
				<input type="hidden" value="" name="groupid" id="gsid"/>
				<table style="border-color: #8DB2E3 ;" >
					<thead>
						<tr>							 
							<td>组名称</td><td>&nbsp;</td><td>备注</td>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
			</form>
			<div id="detail-buttons" style="text-align:center">
				<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#detail').dialog('close')">关闭</a>
			</div>
		</div>
	</div>

</body>